home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wayzata's Best of Shareware PC/Windows 1
/
Wayzata's Best of Shareware for PC-Windows - Release 1 - Wayzata Technology (1993).iso
/
mac
/
DOS
/
PROGRAMG
/
PBBACK10
/
DEMO.BAS
< prev
next >
Wrap
BASIC Source File
|
1992-11-08
|
6KB
|
186 lines
' +----------------------------------------------------------------------+
' | |
' | PBBack Copyright (c) 1990-1992 Thomas G. Hanlin III |
' | |
' +----------------------------------------------------------------------+
' For QuickBASIC 1.x, you can convert this to DEMO.EXE as follows:
' BASCOM DEMO/O;
' LINK DEMO/EX,,NUL,PBBACK;
' For QuickBASIC 2.0-3.x, you can convert this to DEMO.EXE as follows:
' QB DEMO/O;
' LINK DEMO/EX,,NUL,PBBACK;
' For QuickBASIC 4.x and BASCOM 6.x, convert this to DEMO.EXE as follows:
' BC DEMO/O;
' LINK DEMO/EX,,NUL,PBBACK;
DEFINT A-Z
' ----- Pick the colors to use -----------------------------------------------
CALL GetCRT (Colour)
IF Colour THEN _
CALL CalcAttr (7, 1, Attr): _
COLOR 7, 1 _
ELSE _
CALL CalcAttr (7, 0, Attr): _
COLOR 7, 0
CLS
' ----- Display a brief explanation ------------------------------------------
Row = 3
CALL XQPrint ("This is an admittedly trivial demo for the PBBack library. I'll improve", Row, 3, Attr, 0, 1)
Row = Row + 1
CALL XQPrint ("it drastically in later versions. However, for now it will provide an", Row, 3, Attr, 0, 1)
Row = Row + 1
CALL XQPrint ("example of how to access the PBBack routines.", Row, 3, Attr, 0, 1)
Row = Row + 2
' ----- Display processor and coprocessor types ------------------------------
CALL Processor (CPU)
CALL NumProc (NDP)
IF CPU = 0 THEN _
St$ = "NEC V20" _
ELSE IF CPU = 1 THEN _
St$ = "8088" _
ELSE IF CPU = 2 THEN _
St$ = "80186" _
ELSE IF CPU = 3 THEN _
St$ = "80286" _
ELSE IF CPU = 4 THEN _
St$ = "80386" _
ELSE IF CPU = 5 THEN _
St$ = "80486" _
ELSE _
St$ = "80?86"
IF NDP = 1 THEN _
St$ = St$ + " with 8087 math support" _
ELSE IF NDP = 2 THEN _
St$ = St$ + " with 80287 math support" _
ELSE IF NDP = 3 THEN _
St$ = St$ + " with 80387 math support"
CALL XQPrint ("Processor: " + St$, Row, 3, Attr, 0, 1)
Row = Row + 1
' ----- Display DOS version --------------------------------------------------
CALL GetDOSv (MajorV, MinorV)
DOSv$ = MID$(STR$(MajorV), 2) + "." + RIGHT$("0" + MID$(STR$(MinorV), 2), 2)
IF MajorV > 9 THEN _
St$ = " OS/2 Compatibility Box" _
ELSE _
St$ = ""
CALL XQPrint ("DOS version: " + DOSv$ + St$, Row, 3, Attr, 0, 1)
Row = Row + 1
' ----- Display basic equipment info -----------------------------------------
CALL Equipment (Memory, Parallel, Serial, Game)
CALL XQPrint ("Base memory: " + MID$(STR$(Memory), 2) + " Kbytes", Row, 3, Attr, 0, 1)
Row = Row + 1
CALL XQPrint ("Parallel ports: " + MID$(STR$(Parallel), 2), Row, 3, Attr, 0, 1)
Row = Row + 1
CALL XQPrint ("Serial ports: " + MID$(STR$(Serial), 2), Row, 3, Attr, 0, 1)
Row = Row + 1
REM we'll leave out game ports, since that's not always reliable
CALL Floppies (FloppyDrives)
CALL XQPrint ("Floppy drives: " + MID$(STR$(FloppyDrives), 2), Row, 3, Attr, 0, 1)
Row = Row + 1
' ----- Display video adapter type -------------------------------------------
CALL GetVGA (IsVGA)
CALL GetEGA (EGA, Memory)
IF IsVGA THEN _
St$ = "VGA" _
ELSE IF EGA THEN _
St$ = "EGA" _
ELSE IF Colour THEN _
St$ = "CGA" _
ELSE _
St$ = "MDA"
CALL XQPrint ("Display: " + St$, Row, 3, Attr, 0, 1)
Row = Row + 1
' ----- Display BIOS date and type -------------------------------------------
PCDat$ = SPACE$(8) ' init string to right size
CALL PCDate (PCDat$) ' fill it in
CALL XQPrint ("ROM BIOS date: " + PCDat$, Row, 3, Attr, 0, 1)
Row = Row + 1
CALL PCType (MachineID)
IF MachineID = 251 OR MachineID = 254 OR MachineID = 255 THEN _
St$ = "PC/XT" _
ELSE IF MachineID = 253 THEN _
St$ = "PCjr" _
ELSE IF MachineID = 252 THEN _
St$ = "PC AT": _
ATtype = -1 _
ELSE IF MachineID = 250 THEN _
St$ = "PS/2 Model 30" _
ELSE IF MachineID = 249 THEN _
St$ = "PC Convertible" _
ELSE IF MachineID = 248 THEN _
St$ = "PS/2 Model 70 or 80": _
ATtype = -1 _
ELSE IF MachineID = 45 OR MachineID = 154 THEN _
St$ = "Compaq Portable" _
ELSE _
St$ = "unknown"
CALL XQPrint ("Computer type: " + St$, Row, 3, Attr, 0, 1)
Row = Row + 1
' ----- Display extended and expanded memory info ----------------------------
IF ATtype THEN _
CALL ExtMem (Memory): _
CALL XQPrint ("Extended memory (BIOS): " + MID$(STR$(Memory), 2) + " Kbytes", Row, 3, Attr, 0, 1): _
Row = Row + 1
CALL GetLIMM (TotalPages, FreePages)
IF TotalPages THEN _
CALL GetLIMV (MajorV, MinorV): _
St$ = MID$(STR$(MajorV), 2) + "." + RIGHT$("0" + MID$(STR$(MinorV), 2), 2): _
CALL XQPrint ("Expanded memory:", Row, 3, Attr, 0, 1): _
Row = Row + 1: _
CALL XQPrint (" Version: " + St$, Row, 3, Attr, 0, 1): _
Row = Row + 1: _
CALL XQPrint (" Total : " + MID$(STR$(TotalPages * 16), 2) + " Kbytes", Row, 3, Attr, 0, 1): _
Row = Row + 1: _
CALL XQPrint (" Free : " + MID$(STR$(FreePages * 16), 2) + " Kbytes", Row, 3, Attr, 0, 1): _
Row = Row + 1
' ----- Make sure the DOS prompt doesn't get in the way ----------------------
LOCATE 23, 1, 1